Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)

Q is empty.


QTRS
  ↳ DirectTerminationProof

Q restricted rewrite system:
The TRS R consists of the following rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)

Q is empty.

We use [23] with the following order to prove termination.

Lexicographic path order with status [19].
Quasi-Precedence:
[prime1, s1] > [false, prime12, true] > not1 > and2
[prime1, s1] > [false, prime12, true] > divp2 > 0 > and2
[prime1, s1] > [false, prime12, true] > divp2 > =2 > and2
[prime1, s1] > [false, prime12, true] > divp2 > rem2 > and2

Status:
true: multiset
rem2: [1,2]
prime1: [1]
and2: [2,1]
false: multiset
divp2: [2,1]
0: multiset
s1: [1]
=2: [1,2]
prime12: [2,1]
not1: [1]